home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / intuisup.lha / Intuisup / source.lha / Editor / protos.h < prev    next >
C/C++ Source or Header  |  1992-10-05  |  12KB  |  344 lines

  1.  /* $Revision Header *** Header built automatically - do not edit! ***********
  2.  *
  3.  *    (C) Copyright 1991 by Torsten Jürgeleit
  4.  *
  5.  *    Name .....: protos.h
  6.  *    Created ..: Sunday 22-Dec-91 21:22:56
  7.  *    Revision .: 1
  8.  *
  9.  *    Date        Author                 Comment
  10.  *    =========   ====================   ====================
  11.  *    22-Jul-92   Michael Bjerking       Compatible with SAS/C
  12.  *    22-Dec-91   Torsten Jürgeleit      Created this file!
  13.  *
  14.  ****************************************************************************
  15.  *
  16.  *    Prototypes and pragmas
  17.  *
  18.  * $Revision Header ********************************************************/
  19.  
  20.     /* No STATIC here allowed with Aztec C */
  21.  
  22. #ifdef AZTEC_C
  23. #undef STATIC
  24. #define STATIC
  25. #endif
  26.  
  27.     /* Prototypes - editor.c */
  28.  
  29. SHORT editor_action_loop(VOID);
  30. STATIC SHORT perform_editor_action(VOID);
  31. STATIC VOID  change_editor_mode(USHORT gadget, LONG value);
  32. VOID  print_template_info(VOID);
  33. VOID  clear_template_info(VOID);
  34. VOID  start_gadget_use_mode(VOID);
  35. VOID  end_gadget_use_mode(VOID);
  36.  
  37.     /* Pragmas - editor.c */
  38.  
  39. #ifdef AZTEC_C
  40. #pragma regcall(change_editor_mode(d0,d1))
  41. #endif
  42.  
  43.     /* Prototypes - edit1.c */
  44.  
  45. SHORT edit_template_data(VOID);
  46.  
  47.     /* Pragmas - edit1.c */
  48.  
  49.  
  50.     /* Prototypes - edit2.c */
  51.  
  52. SHORT edit_template_data_action(struct Template  *old_tp, APTR normal_gl, APTR special_gl1, APTR special_gl2, APTR edit_gl);
  53. SHORT change_normal_template_data(APTR gl, struct Template  *tp, USHORT entry, ULONG value);
  54. SHORT change_special_template_data(APTR gl, struct Template  *tp, USHORT entry, ULONG value);
  55.  
  56.     /* Pragmas - edit2.c */
  57.  
  58. #ifdef AZTEC_C
  59. #pragma regcall(edit_template_data_action(a0,a1,a2,a3,d0))
  60. #pragma regcall(change_normal_template_data(a0,a1,d0,d1))
  61. #pragma regcall(change_special_template_data(a0,a1,d0,d1))
  62. #endif
  63.  
  64.     /* Prototypes - fonts.c */
  65.  
  66. struct TextAttr  *open_template_font_by_attributes(struct TemplateList  *tl, BYTE *name, USHORT ysize);
  67. struct TextAttr  *open_template_font_by_num(struct TemplateList  *tl, USHORT num);
  68. USHORT get_template_font_num(struct TemplateList  *tl, struct TextAttr  *ta);
  69. VOID   close_template_font(struct TemplateList  *tl, struct TextAttr  *ta);
  70. VOID   free_font_list(struct TemplateList  *tl);
  71. VOID   free_template_font(struct TemplateFont  *tf);
  72.  
  73.     /* Pragmas - fonts.c */
  74.  
  75. #ifdef AZTEC_C
  76. #pragma regcall(open_template_font_by_attributes(a0,a1,d0))
  77. #pragma regcall(open_template_font_by_num(a0,d0))
  78. #pragma regcall(get_template_font_num(a0,a1))
  79. #pragma regcall(close_template_font(a0,a1))
  80. #pragma regcall(free_font_list(a0))
  81. #pragma regcall(free_template_font(a0))
  82. #endif
  83.  
  84.     /* Prototypes - list.c */
  85.  
  86. APTR  build_text_list_editor(struct Template  *tp, SHORT hoffset, SHORT voffset);
  87. VOID  change_text_list_editor_mode(APTR gl, USHORT mode);
  88. SHORT perform_text_list_editor_action(APTR gl, struct Template  *tp, USHORT entry, ULONG value);
  89.  
  90.     /* Pragmas - list.c */
  91.  
  92. #ifdef AZTEC_C
  93. #pragma regcall(build_text_list_editor(a0,d0,d1))
  94. #pragma regcall(change_text_list_editor_mode(a0,d0))
  95. #pragma regcall(perform_text_list_editor_action(a0,a1,d0,d1))
  96. #endif
  97.  
  98.     /* Prototypes - load.c */
  99.  
  100. SHORT  load_project(USHORT mode);
  101. STATIC SHORT  parse_block(struct FileData  *fd, struct TemplateList  *tl, USHORT block_type, USHORT mode);
  102. STATIC SHORT  parse_item(struct TemplateList  *tl, USHORT block_type, BYTE *keyword, BYTE *arg, USHORT mode);
  103. STATIC USHORT search_keyword(BYTE *keyword, BYTE **keyword_list);
  104. struct FileData  *open_file(BYTE *name);
  105. SHORT  read_line(struct FileData  *fd);
  106. BYTE   *fill_read_buffer(struct FileData  *fd);
  107. VOID   close_file(struct FileData  *fd);
  108.  
  109.     /* Pragmas - load.c */
  110.  
  111. #ifdef AZTEC_C
  112. /* #pragma regcall(parse_block(a0,a1,d0,d1)) --- NO PRAGMA - recursive!!! */
  113. #pragma regcall(parse_item(a0,d0,a1,a2,d1))
  114. #pragma regcall(search_keyword(a0,a1))
  115. #pragma regcall(open_file(a0))
  116. #pragma regcall(read_line(a0))
  117. #pragma regcall(fill_read_buffer(a0))
  118. #pragma regcall(close_file(a0))
  119. #endif
  120.  
  121.     /* Prototypes - main.c */
  122.  
  123. LONG init_resources(VOID);
  124. #ifdef    AZTEC_C
  125. BOOL file_filterfunc (struct Hook *, struct rtFileRequester *,
  126.     struct FileInfoBlock *);
  127. #else
  128. BOOL __asm __saveds file_filterfunc (
  129.     register __a0 struct Hook *, register __a2 struct rtFileRequester *,
  130.     register __a1 struct FileInfoBlock *
  131.     );
  132. #endif
  133.  
  134.     /* Pragmas - main.c */
  135.  
  136. #ifdef AZTEC_C
  137. #pragma intfunc(file_filterfunc(a0,a2,a1))
  138. #endif
  139.  
  140.     /* Prototypes - project.c */
  141.  
  142. SHORT perform_project_action(VOID);
  143. STATIC VOID  end_rubber_banding(VOID);
  144. VOID  print_project_window_title(VOID);
  145. SHORT new_project(struct TemplateList  *tl, USHORT new_flags);
  146. SHORT new_project_window(struct TemplateList  *tl, USHORT new_flags);
  147. VOID  clear_project_window(USHORT flags);
  148. VOID  change_project_name(struct TemplateList  *tl, BYTE *new_name, SHORT len);
  149.  
  150.     /* Pragmas - project.c */
  151.  
  152. #ifdef AZTEC_C
  153. #pragma regcall(new_project(a0,d0))
  154. #pragma regcall(new_project_window(a0,d0))
  155. #pragma regcall(clear_project_window(d0))
  156. #pragma regcall(change_project_name(a0,a1,d0))
  157. #endif
  158.  
  159.     /* Prototypes - req.c */
  160.  
  161. VOID show_error(SHORT status);
  162. VOID continue_requester(BYTE *title, BYTE *text);
  163. STATIC VOID intuition_error_requester(BYTE *text);
  164. VOID about_requester(VOID);
  165. BOOL ok_cancel_requester(BYTE *title, BYTE *text);
  166.  
  167.     /* Pragmas - req.c */
  168.  
  169. #ifdef AZTEC_C
  170. #pragma regcall(show_error(d0))
  171. #pragma regcall(continue_requester(a0,a1))
  172. #pragma regcall(intuition_error_requester(a0))
  173. #pragma regcall(ok_cancel_requester(a0,a1))
  174. #endif
  175.  
  176.     /* Prototypes - save.c */
  177.  
  178. SHORT save_project(VOID);
  179. STATIC SHORT write_project_header(FILE* fh, struct TemplateList  *tl);
  180. STATIC SHORT write_project_fonts(FILE* fh, struct TemplateList  *tl);
  181. STATIC SHORT write_project_templates(FILE* fh, struct TemplateList  *tl);
  182.  
  183.     /* Pragmas - save.c */
  184.  
  185. #ifdef AZTEC_C
  186. #pragma regcall(write_project_header(a0,a1))
  187. #pragma regcall(write_project_fonts(a0,a1))
  188. #pragma regcall(write_project_templates(a0,a1))
  189. #endif
  190.  
  191.     /* Prototypes - screen.c */
  192.  
  193. SHORT change_project_screen(VOID);
  194.  
  195.     /* Pragmas - screen.c */
  196.  
  197.  
  198.     /* Prototypes - source.c */
  199.  
  200. SHORT save_c_source(VOID);
  201. STATIC SHORT save_c_source_action(APTR gl, struct TemplateList  *tl);
  202. STATIC SHORT generate_c_source(struct TemplateList  *tl);
  203. STATIC SHORT write_project_window(FILE* fh, struct TemplateList  *tl);
  204. STATIC SHORT write_project_borders(FILE* fh, struct TemplateList  *tl);
  205. STATIC SHORT write_project_fonts(FILE* fh, struct TemplateList  *tl);
  206. STATIC SHORT write_project_texts(FILE* fh, struct TemplateList  *tl);
  207. STATIC SHORT write_project_gadgets(FILE* fh, struct TemplateList  *tl);
  208. STATIC SHORT write_project_program(FILE* fh, struct TemplateList  *tl);
  209. STATIC SHORT write_gadget_text_array(FILE* fh, struct TemplateList  *tl, BYTE *id, USHORT count, BYTE **array);
  210. STATIC SHORT write_gadget_list(FILE* fh, struct TemplateList  *tl, BYTE *id, USHORT count, struct List  *list);
  211. STATIC SHORT write_gadget_special_data(FILE* fh, BYTE *id, USHORT count, struct GadgetData  *gd);
  212.  
  213.     /* Pragmas - source.c */
  214.  
  215. #ifdef AZTEC_C
  216. #pragma regcall(save_c_source_action(a0,a1))
  217. #pragma regcall(generate_c_source(a0))
  218. #pragma regcall(write_project_window(a0,a1))
  219. #pragma regcall(write_project_borders(a0,a1))
  220. #pragma regcall(write_project_fonts(a0,a1))
  221. #pragma regcall(write_project_texts(a0,a1))
  222. #pragma regcall(write_project_gadgets(a0,a1))
  223. #pragma regcall(write_project_program(a0,a1))
  224. #pragma regcall(write_gadget_text_array(a0,a1,a2,d0,a3))
  225. #pragma regcall(write_gadget_list(a0,a1,a2,d0,a3))
  226. #pragma regcall(write_gadget_special_data(a0,a1,d0,a2))
  227. #endif
  228.  
  229.     /* Prototypes - subs.c */
  230.  
  231. VOID  draw_box(struct Window  *win, struct Box  *box);
  232. VOID  draw_box_with_border(struct Window  *win, struct Box  *box);
  233. VOID  draw_box_with_offset(struct Window  *win, struct Box  *box, SHORT xoffset, SHORT yoffset);
  234. VOID  *get_head(struct List  *list);
  235. VOID  *get_tail(struct List  *list);
  236. VOID  *get_succ(struct Node  *node);
  237. VOID  *get_pred(struct Node  *node);
  238. VOID  *get_node(struct List  *list, USHORT num);
  239. SHORT duplicate_string(BYTE *text, BYTE **ptr);
  240. VOID  lower_string(BYTE *ptr, BYTE *text);
  241. VOID  upper_string(BYTE *ptr, BYTE *text);
  242. SHORT duplicate_text_list(struct Template  *old_tp, struct Template  *new_tp);
  243. SHORT build_template_text_list(struct Template  *tp, BYTE **text_array);
  244. SHORT add_template_text_list_entry(struct Template  *tp, BYTE *text);
  245. VOID  free_template_text_list(struct Template  *tp);
  246. VOID  free_text_list_entry(struct Node  *node);
  247. SHORT build_template_text_array(struct Template  *tp);
  248. struct Node  *build_text_list_entry(BYTE *text);
  249. VOID  free_template_text_array(struct Template  *tp);
  250.  
  251.     /* Pragmas - subs.c */
  252.  
  253. #ifdef AZTEC_C
  254. #pragma regcall(draw_box(a0,a1))
  255. #pragma regcall(draw_box_with_border(a0,a1))
  256. #pragma regcall(draw_box_with_offset(a0,a1,d0,d1))
  257. #pragma regcall(get_head(a0))
  258. #pragma regcall(get_tail(a0))
  259. #pragma regcall(get_succ(a0))
  260. #pragma regcall(get_pred(a0))
  261. #pragma regcall(get_node(a0,d0))
  262. #pragma regcall(duplicate_string(a0,a1))
  263. #pragma regcall(lower_string(a0,a1))
  264. #pragma regcall(upper_string(a0,a1))
  265. #pragma regcall(duplicate_text_list(a0,a1))
  266. #pragma regcall(build_template_text_list(a0,a1))
  267. #pragma regcall(build_text_list_entry(a0))
  268. #pragma regcall(add_template_text_list_entry(a0,a1))
  269. #pragma regcall(free_template_text_list(a0))
  270. #pragma regcall(free_text_list_entry(a0))
  271. #pragma regcall(build_template_text_array(a0))
  272. #pragma regcall(free_template_text_array(a0))
  273. #endif
  274.  
  275.     /* Prototypes - template.c */
  276.  
  277. struct Template  *get_template_by_num(LONG num);
  278. struct Template  *get_template_by_pos(SHORT x, SHORT y);
  279. struct Template  *find_template_by_pos(SHORT x, SHORT y);
  280. VOID   fix_template_bounds(VOID);
  281. USHORT get_modify_mode(SHORT x, SHORT y);
  282. struct Template  *create_template(struct TemplateList  *tl);
  283. VOID   add_template_to_list(struct TemplateList  *tl, struct Template  *tp, BOOL default_name);
  284. VOID   build_default_template_name(struct TemplateList  *tl, struct Template  *tp);
  285. SHORT  init_default_template_data(struct TemplateList  *tl, struct Template  *tp, BOOL default_name);
  286. struct Template  *clone_template(struct TemplateList  *tl, struct Template  *old_tp, BOOL full_clone);
  287. STATIC SHORT  clone_template_data(struct TemplateList  *tl, struct Template  *old_tp, struct Template  *new_tp);
  288. VOID   display_template(struct Template  *tp);
  289. VOID   refresh_all_templates(VOID);
  290. VOID   free_template_list(struct TemplateList  *tl);
  291. VOID   free_template(struct TemplateList  *tl, struct Template  *tp);
  292. VOID   free_template_data(struct TemplateList  *tl, struct Template  *tp);
  293. VOID   delete_template(struct Template  *tp);
  294.  
  295.     /* Pragmas - template.c */
  296.  
  297. #ifdef AZTEC_C
  298. #pragma regcall(get_template_by_num(d0))
  299. #pragma regcall(get_template_by_pos(d0,d1))
  300. #pragma regcall(find_template_by_pos(d0,d1))
  301. #pragma regcall(get_modify_mode(d0,d1))
  302. #pragma regcall(create_template(a0))
  303. #pragma regcall(add_template_to_list(a0,a1,d0))
  304. #pragma regcall(build_default_template_name(a0,a1))
  305. #pragma regcall(init_default_template_data(a0,a1,d0))
  306. #pragma regcall(clone_template(a0,a1,d0))
  307. #pragma regcall(clone_template_data(a0,a1,a2))
  308. #pragma regcall(display_template(a0))
  309. #pragma regcall(free_template_list(a0))
  310. #pragma regcall(free_template(a0,a1))
  311. #pragma regcall(free_template_data(a0,a1))
  312. #pragma regcall(delete_template(a0))
  313. #endif
  314.  
  315.     /* Prototypes - window.c */
  316.  
  317. SHORT change_project_window(VOID);
  318. STATIC SHORT change_project_window_action(APTR gl);
  319.  
  320.     /* Pragmas - window.c */
  321.  
  322. #ifdef AZTEC_C
  323. #pragma regcall(change_project_window_action(a0))
  324. #endif
  325.  
  326.     
  327.     /* Prototypes - screen.c */
  328.  
  329. SHORT change_project_screen(VOID);
  330. STATIC SHORT change_project_screen_action(APTR);
  331.  
  332.     /* Pragmas - screen.c */
  333.  
  334. #ifdef AZTEC_C
  335. #pragma regcall(change_project_screen_action(a0))
  336. #endif
  337.  
  338.     /* Turn on STATIC now */
  339.  
  340. #ifdef AZTEC_C
  341. #undef STATIC
  342. #define STATIC    static
  343. #endif
  344.